package apy.codecase.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import apy.codecase.business.view.fragment.FragmentFactory;

/**
 * Created by Administrator on 2017/10/25.
 */

public class MainVpAdapter extends FragmentPagerAdapter {

    private int[] bottomMsg;

    public MainVpAdapter(FragmentManager fm,int[] bottomMsg) {
        super(fm);
        this.bottomMsg = bottomMsg;
    }

    @Override
    public Fragment getItem(int position) {
        return FragmentFactory.createFragment(position);
    }

    @Override
    public int getCount() {
        return bottomMsg.length;
    }
}
